package dgo.tilemap;
import starruby.Texture;

public class MapChipset {
  public int gridWidth, gridHeight;
  public Texture texture;
  public String name;
  public PaletChip[] paletChips;
  protected MapChipset(String filename, String name, int gridWidth, int gridHeight){
    this.gridWidth = gridWidth;
    this.gridHeight = gridHeight;
    this.name = name;
    texture = Texture.load(filename);
  }
  
  public int width(){
    return texture.getWidth();
  }

  public int height(){
    return texture.getHeight();
  }

  public byte xCount(){
    return (byte)(width() / gridWidth);
  }
  
  public byte yCount(){
    return (byte)(height() / gridHeight);
  }
}
